package com.ibm.sc.osp.sample.service;

import com.ibm.sc.osp.sample.domain.entity.Message;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

public interface MessageService {
    /**
     * 增
     */
    @HystrixCommand
    Message add(Message message) throws Exception;
    
    /**
     * 删(逻辑删除)
     */
    String remove(String id) throws Exception;
    
    /**
     * 改
     */
    Message update(Message message) throws Exception;
    
    /**
     * 查
     */
    Message get(String id) throws Exception;
    
    /**
     * 查询
     */
    Page<Message> findAll(PageRequest page) throws Exception;
    
}
